home *** CD-ROM | disk | FTP | other *** search
/ BMUG PD-ROM A / PD-ROM A.iso / Programming / Programming Languages / Pocket Forth rel.5 / Text files / BareBones next >
Encoding:
Text File  |  1991-08-04  |  1.1 KB  |  45 lines  |  [TEXT/MACA]

  1. ( Bare Bones )
  2. ( Strip a copy of Pocket Forth to the bare essential resources )
  3. : 00>R ( rstack: -- 0 0 ) ,$ 42A7 ; macro  ( clr.l -[rs] )
  4. : R" ( -- d ) ( convert 4 chars to d# )
  5.     34 word
  6.     here 1+  here  4  cmove
  7.     here 2@ ;
  8.  
  9. : RGET ( ID type -- dhandle )
  10.     00>r  2>r  >r  ,$ A9A0 2r>  ( _GetResource )
  11.     ?dup 0= IF ." Resource" abort THEN ;
  12.  
  13. : RRMVE ( dhandle -- ) ( remove resource at dhandle )
  14.     2>r ,$ A9AD ;
  15.  
  16. : HDISP ( dhandle -- ) ( dispose of handle at dhandle )
  17.     ,$ 205E ,$ A023 ;
  18.  
  19. : RSTRIP ( ID type -- ) ( strip resource )
  20.     rget 2dup rrmve hdisp ;
  21.  
  22.                 ( **** WARNING ***** )
  23. ( The following lines of code permenantly change this )
  24. ( copy of Pocket Forth.  If you do not wish to strip  )
  25. ( all of the non-essential resources from this copy,  )
  26. ( then close this window NOW.  If you do, press a key )
  27. key drop
  28.  
  29. 257 r" actb" rstrip
  30. 258 r" actb" rstrip
  31. 257 r" hdlg" rstrip
  32.   1 r" hmnu" rstrip
  33.   2 r" hmnu" rstrip
  34.   3 r" hmnu" rstrip
  35. 128 r" hrct" rstrip
  36. 128 r" hwin" rstrip
  37. 128 r" icl4" rstrip
  38. 128 r" icl8" rstrip
  39. 128 r" ics#" rstrip
  40. 128 r" ics4" rstrip
  41. 128 r" ics8" rstrip
  42. 129 r" PICT" rstrip
  43.   1 r" STR#" rstrip
  44.  
  45.